"""
@File    : HW_object_oriented_programming.py
@Author  : WorldWind(1772830365@qq.com)
@Time    : 2025/7/11
"""
class Student:
    student_id = 1001
    gender = 'man'
    age = 10

    def __init__(self, student_id, gender, age):
        self.student_id = student_id
        self.gender = gender
        self.age = age
        print('This is __init__ method. Student begin')

    def __del__(self):
        print('This is __del__ method. The Student has been recycled')

    def study(self, *subject):
        subject = subject if subject else []
        for subject in subject:
            print(f'Student No. {self.student_id} is studying the {subject} subject')

    def run(self):
        print(f"Student number {self.student_id} is running!")


st1 = Student(2002, 'man', 18)
st1.study('python', 'java', 'Chinese', 'English', 'javascript')
st1.run()

